using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GO_Test_1.Components;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace GO_Test_1 {

	public static class LevelManager {

		public static void LoadLevel(ContentManager contentManager, int levelNumber) {
			// Load Textures
			AssetManager.Textures.Add("white-square", contentManager.Load<Texture2D>(@"Images/white-square"));
			AssetManager.Textures.Add("ball", contentManager.Load<Texture2D>(@"Images/ball"));

			// Load bricks.
			for (float i = 0; i < Game1.gameBounds.Width; i += 32) {
				GoManager.AddBlock(AssetManager.Textures["white-square"], new Vector2(i, 64f), 32, 32, Color.Red);
				GoManager.AddBlock(AssetManager.Textures["white-square"], new Vector2(i, 96f), 32, 32, Color.Orange);
				GoManager.AddBlock(AssetManager.Textures["white-square"], new Vector2(i, 128f), 32, 32, Color.Yellow);
				GoManager.AddBlock(AssetManager.Textures["white-square"], new Vector2(i, 160f), 32, 32, Color.Green);
				GoManager.AddBlock(AssetManager.Textures["white-square"], new Vector2(i, 192f), 32, 32, Color.Blue);
				GoManager.AddBlock(AssetManager.Textures["white-square"], new Vector2(i, 224f), 32, 32, Color.Indigo);
				GoManager.AddBlock(AssetManager.Textures["white-square"], new Vector2(i, 256f), 32, 32, Color.Violet);
			}

			// Load ball.
			GoManager.AddBall(AssetManager.Textures["ball"], new Vector2(400-8, 500-6), new Movement {Speed = 200, Direction = new Vector2(4, -1)}, 16, 16);
		}

	}

}